<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <jsp:include page="/WEB-INF/views/admin/common/import.jsp">
        <jsp:param name="title" value="用户管理"/>
    </jsp:include>

</head>
<body>

<div class="grid-container">
    <jsp:include page="/WEB-INF/views/admin/common/navbar.jsp">
        <jsp:param name="active" value="user"/>
    </jsp:include>

    <jsp:include page="/WEB-INF/views/admin/common/header.jsp">
        <jsp:param name="title" value="用户管理-新增"/>
    </jsp:include>
    <main class="p-4">
        <form class="row g-3" action="${pageContext.request.contextPath}/admin/user?method=create" method="post">
            <div class="form-group">
                <label for="name" class="control-label">姓名:</label>
                <input type="text" class="form-control" id="name" name="name" required="required"
                       oninvalid="setCustomValidity('请输入姓名！');" oninput="setCustomValidity('');">
            </div>
            <div class="form-group">
                <label for="username" class="control-label">用户名:</label>
                <input type="text" class="form-control" id="username" name="username" required="required"
                       oninvalid="setCustomValidity('请输入用户名！');" oninput="setCustomValidity('');">
            </div>
            <div class="form-group">
                <label for="password" class="control-label">密码:</label>
                <input type="password" class="form-control" id="password" name="password" required="required"
                       oninvalid="setCustomValidity('请输入密码！');" oninput="setCustomValidity('');">
            </div>
            <div class="form-group">
                <input class="btn btn-primary" type="submit" value="提交">
                <a href="${pageContext.request.contextPath}/admin/user?method=viewList"
                   class="btn btn-secondary btn-submit">返回列表</a>
            </div>
        </form>
    </main>
</div>
</body>
</html>
